// Fill out your copyright notice in the Description page of Project Settings.

#include "Isalong2.h"
#include "FireEffect.h"


// Sets default values
AFireEffect::AFireEffect()
{
 	// Set this actor to call Tick() every frame.  You can turn this off to improve performance if you don't need it.
	PrimaryActorTick.bCanEverTick = true;

	_particleSys = CreateDefaultSubobject<UParticleSystemComponent>(TEXT("EffectParticle"));
	RootComponent = _particleSys;
	_particleSys->SetRelativeRotation(FRotator(90, 0, 0));

	InitialLifeSpan = 5;
}

// Called when the game starts or when spawned
void AFireEffect::BeginPlay()
{
	Super::BeginPlay();
}

// Called every frame
void AFireEffect::Tick( float DeltaTime )
{
	Super::Tick( DeltaTime );

}

void AFireEffect::SetUpParticle(UParticleSystem* particle)
{
	_particleSys->SetTemplate(particle);
	_particleSys->SetActive(true, true);
}

